<div align="right">
<a href="<?=$_SERVER['REQUEST_URI']?>/add">Tambah</a>
</div>
<table>
	<tr>
		<th>ID</th>
		<th>BODY</th>
		<th>CREATED</th>
		<th>ACTION</th>
	<tr>
<?php 
	for($i=0;$i < count($posts);$i++) {
?>
	<tr>
		<td><?=$posts[$i]['Post']['id']?></td>
		<td><a href="<?=$_SERVER['REQUEST_URI']?>index.php/posts/view/<?=$posts[$i]['Post']['id']?>"><?=$posts[$i]['Post']['title']?></a></td>
		 <td align="center"><?=$posts[$i]['Post']['created']?></td>
		 <td><a href="<?=$_SERVER['REQUEST_URI']?>index.php/posts/edit/<?=$posts[$i]['Post']['id']?>">Edit</a>
		  <a href="<?=$_SERVER['REQUEST_URI']?>index.php/posts/delete/<?=$posts[$i]['Post']['id']?>">Delete</a> 
		 </td>
	</tr>
<?php
	}
?>
</table>